{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "#data_df=pd.read_csv(\"train.csv\",nrows=100000000)\n",
    "data_df=pd.read_csv(\"train.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>file_id</th>\n",
       "      <th>label</th>\n",
       "      <th>api</th>\n",
       "      <th>tid</th>\n",
       "      <th>return_value</th>\n",
       "      <th>index</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>GetSystemTimeAsFileTime</td>\n",
       "      <td>2644</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NtAllocateVirtualMemory</td>\n",
       "      <td>2644</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NtFreeVirtualMemory</td>\n",
       "      <td>2644</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NtAllocateVirtualMemory</td>\n",
       "      <td>2644</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NtAllocateVirtualMemory</td>\n",
       "      <td>2644</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   file_id  label                      api   tid  return_value  index\n",
       "0        0      0  GetSystemTimeAsFileTime  2644             0      0\n",
       "1        0      0  NtAllocateVirtualMemory  2644             0      1\n",
       "2        0      0      NtFreeVirtualMemory  2644             0      2\n",
       "3        0      0  NtAllocateVirtualMemory  2644             0      3\n",
       "4        0      0  NtAllocateVirtualMemory  2644             0      4"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(409631049, 6)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_df.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "label_df=data_df.groupby(['file_id','label'])['label'].unique()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "label_class=label_df.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[0]    111545\n",
       "[5]      3397\n",
       "[2]       744\n",
       "[3]       598\n",
       "[1]       287\n",
       "[4]        53\n",
       "Name: label, dtype: int64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "label_class"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "dict={0:\"Normal\",1:\"Infectious virus\",2:\"MM\",3:\"Mining procedure\",4:\"DDOS MM\",5:\"Worm virus\"}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAn0AAAFDCAYAAABP67iNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xm4JFV9//H3R0YEIQjCuLDooBANuKCMiLsBfwjGCDESIBpQURKDUROXqHkiChqXqATikiDMj8VlRNRAFESCokYRGARZVeYHCiMoowOoKCrw/f1R50Jz6Xvv3Jm7Tr1fz3Of23XqVNWp6u7qT5+q6kpVIUmSpHXbfWa7AZIkSZp+hj5JkqQeMPRJkiT1gKFPkiSpBwx9kiRJPWDokyRJ6gFDnyRJUg8Y+iRJknrA0CdJktQDC2a7AXPRFltsUYsWLZrtZkiSJE3owgsv/FlVLZyonqFviEWLFrFs2bLZboYkSdKEkvxodep5eFeSJKkHDH2SJEk9YOiTJEnqAUOfJElSDxj6JEmSesDQJ0mS1AOGPkmSpB4w9EmSJPWAoU+SJKkHDH2SJEk9YOiTJEnqAe+9u4ZectQXZ7sJ88bHX/sns90ESZJ6z54+SZKkHjD0SZIk9YChT5IkqQcMfZIkST1g6JMkSeoBQ58kSVIPGPokSZJ6wNAnSZLUA4Y+SZKkHjD0SZIk9YChT5IkqQcMfZIkST1g6JMkSeoBQ58kSVIPGPokSZJ6wNAnSZLUA4Y+SZKkHjD0SZIk9YChT5IkqQcMfZIkST1g6JMkSeoBQ58kSVIPzEjoS7IkyY1JLhsoe2CSs5Jc1f5v1sqT5Ogky5NckuSJA9Mc1OpfleSggfKdk1zapjk6ScZb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nAD8J4kG7WLL542qs4f0J1/txJYkORtwCYjI5O8JMnCqroTuLkV35Hkj5M8tp03+Au6w7Z3VNUNdOfsfSDJJknuk+SRSZ7V5rdvkq3bfG4CCrhjWtZe0jrH0CdJQ1TVHcCf0l1QcS2wAthvVLUzgTOAH9Bd8HEbXQ/hiD2By5P8iu6ijv2r6jbgIcApdIHvSuBrwMfbNAcC6wNX0AW7U4CHtnFPAs5r8zsNeG1VXTNFqyxpHZeqmu02SJIkaZrZ0ydJktQDhj5JkqQeMPRJkiT1gKFPkiSpBwx9kiRJPWDokyRJ6gFDnyRJUg8Y+iRJknrA0CdJktQD/x9LDuDd1sJz/gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 720x360 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "plt.figure(figsize=(10,5))\n",
    "sns.barplot([str(dict[i[0]])for i in label_class.index],label_class.values,alpha=0.8)\n",
    "plt.xlabel(\"classes\",fontsize = 12)\n",
    "plt.ylabel(\"number\",fontsize=12)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Normal',\n",
       " 'Worm virus',\n",
       " 'MM',\n",
       " 'Mining procedure',\n",
       " 'Infectious virus',\n",
       " 'DDOS MM']"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[str(dict[i[0]])for i in label_class.index]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([111545,   3397,    744,    598,    287,     53])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "label_class.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
